<template>
	<!-- 筛选栏 -->
	<view class="filter">
		<text class="recomBtn">推荐</text>
		<view class="city">
			
				<view class="uni-input" @tap="goWorkPlace">{{currentCity}}
					<view class="down">
	
					</view>
				</view>
		
	
	
			<!-- <picker @change="getEdit" :value="currentEdit" :range="editList"> -->
				<view class="uni-input" @tap="goCondition">{{editList[currentEdit]}}
					<view class="down">
	
					</view>
				</view>
			<!-- </picker> -->
	
		</view>
	</view>
</template>

<script>
	export default {
		data(){
			return {
				// currentCity: 0,
				currentEdit: 0,
				cityList: [
					'合肥', '黄山', '北京', '上海', '南京'
				],
				editList: [
					'筛选', '排序'
				],
				
			}
		},
		
			
		props:{
			currentCity:{
				type:String
			}
		},
		
		methods:{
				getCity(e){
							 console.log('picker发送选择改变，携带值为', e.target.value);
							this.currentCity = e.target.value;
							uni.$emit('getCity',this.cityList[this.currentCity]);
						},
						
						getEdit(e){
							 console.log('picker发送选择改变，携带值为', e.target.value);
							this.currentEdit = e.target.value
						},
						
						goCondition(){
							uni.navigateTo({
								url:'/pages/views/home/condition'
							})
						},
						
						goWorkPlace(){
							uni.navigateTo({
								url:'/pages/views/home/workPlace'
							})
						}
		},
		onLoad() {
		
		
				},
				onShow() {
		
				},
				onHide() {
		
				},
				onPageScroll: function(Object) {
		
				},
	}
</script>

<style scoped lang="less">
	
	.filter {
		width: 750upx;
		height: 80upx;
		display: flex;
		justify-content: space-between;
		align-items: center;
		background-color: #fff;
		padding: 0 29upx;

		
		.recomBtn {
			font-size: 26upx;
			color: #3767b2;
		}
	
		.city {
			color: #999999;
			font-size: 26upx;
			display: flex;
			width: 215upx;
			justify-content: space-between;
	
			.down {
				display: inline-block;
				width: 0;
				height: 0;
				border-top: 15upx solid #707070;
				border-left: 15upx solid transparent;
				border-right: 15upx solid transparent;
				margin: 5upx 0 0 10upx;
			}
		}
	}
</style>
